<template>
  <div>
    <el-dialog title="风险预警产品详情" :visible.sync="show" :modal="false" :close-on-click-modal="false">
      <el-table :data="data">
        <el-table-column v-for='(value,key) in data[0]' :property="key" :label="key" width="180"></el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>

<script>

export default {
  props: ["dialogTableVisible","currentRiskInfo"],
  data() {
    return {
    };
  },
  computed:{
    show:{
      get(){
        return this.$props.dialogTableVisible;
      },
      set(val){
        this.$emit("closed")
      }
    },
    data(){
      const riskObj = {};
      for(let key in this.$props.currentRiskInfo){
        if(key != "docpath"){
          riskObj[key] = this.$props.currentRiskInfo[key];
        }
      }
      return [riskObj];
    }
  },
};
</script>

<style scoped></style>
